package com.sunny.cloudfeignconsumer;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Feign 集成 ribbon、hystrix
 * 自动支持负载均衡、断路器
 *
 * @author Sunny
 * @date 2019/11/12 上午10:07
 */
@FeignClient(value = "CLOUD-EUREKA-CLIENT", fallback = FeignInterfaceHystrix.class)
public interface FeignInterface {

    @GetMapping(value = "hi")
    String hiService(@RequestParam(value = "name") String name);
}
